package com.dy.project.service.impl;

import com.dy.project.domain.McBalcony;
import com.dy.project.domain.McBed;
import com.dy.project.domain.McFloor;
import com.dy.project.domain.McStorage;
import com.dy.project.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class DtoServiceImpl implements DtoService {

    @Autowired
    private IMcBalconyService mcBalconyService;
    @Autowired
    private IMcFloorService mcFloorService;
    @Autowired
    private IMcStorageService mcStorageService;
    @Autowired
    private IMcBedService mcBedService;
    @Override
    public Map<String,Object> selectDtoList() {
        Map<String,Object> dtoInfo = new HashMap<>();
        dtoInfo.put("balconies",mcBalconyService.selectMcBalconyList(new McBalcony()));
        dtoInfo.put("floors",mcFloorService.selectMcFloorList(new McFloor()));
        dtoInfo.put("storages",mcStorageService.selectMcStorageList(new McStorage()));
        dtoInfo.put("beds",mcBedService.selectMcBedList(new McBed()));
        return dtoInfo;
    }
}
